package tech.youai.nav;

import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class UrlInfo implements Serializable {
    private String category;
    private String urlBuilder;
    private Map<String, Object> arguments;
    public UrlInfo(){}
    public UrlInfo(String category){
        this.category = category;
    }

    public UrlInfo(String category, String urlBuilder){
        this.urlBuilder = urlBuilder;
        this.category = category;
    }


    public UrlInfo(String category,String urlBuilder, Map<String, Object> arguments){
        this.category = category;
        this.urlBuilder = urlBuilder;
        this.arguments = arguments;
    }
    public void addArg(String key, Object value){
        if(arguments==null){
            arguments = new HashMap<>();
        }
        arguments.put(key, value);
    }


    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getUrlBuilder() {
        return urlBuilder;
    }

    public void setUrlBuilder(String urlBuilder) {
        this.urlBuilder = urlBuilder;
    }

    public Map<String, Object> getArguments() {
        return arguments;
    }

    public void setArguments(Map<String, Object> arguments) {
        this.arguments = arguments;
    }
}
